/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.cip.esymons.eventos.be;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
//import javax.persistence.NamedQueries;
//import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Lizardo
 */
@Entity
@Table(name = "eca_numera_contratos")
//@NamedQueries({@NamedQuery(name = "NumeraContratos.findAll", query = "SELECT n FROM NumeraContratos n"), @NamedQuery(name = "NumeraContratos.findByNcoCodigo", query = "SELECT n FROM NumeraContratos n WHERE n.ncoCodigo = :ncoCodigo"), @NamedQuery(name = "NumeraContratos.findByNcoNumeracion", query = "SELECT n FROM NumeraContratos n WHERE n.ncoNumeracion = :ncoNumeracion")})
public class NumeraContratos implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "nco_codigo")
    private Long ncoCodigo;
    @Basic(optional = false)
    @Column(name = "nco_numeracion")
    private String ncoNumeracion;
    @Basic(optional = false)
    @Column(name = "nco_numDigitos")
    private Integer ncoNumDigitos;


    public NumeraContratos() {
    }

    public NumeraContratos(Long ncoCodigo) {
        this.ncoCodigo = ncoCodigo;
    }

    public NumeraContratos(Long ncoCodigo, String ncoNumeracion) {
        this.ncoCodigo = ncoCodigo;
        this.ncoNumeracion = ncoNumeracion;
    }

    public Long getNcoCodigo() {
        return ncoCodigo;
    }

    public void setNcoCodigo(Long ncoCodigo) {
        this.ncoCodigo = ncoCodigo;
    }

    public String getNcoNumeracion() {
        return ncoNumeracion;
    }

    public void setNcoNumeracion(String ncoNumeracion) {
        this.ncoNumeracion = ncoNumeracion;
    }

    public Integer getNcoNumDigitos() {
        return ncoNumDigitos;
    }

    public void setNcoNumDigitos(Integer ncoNumDigitos) {
        this.ncoNumDigitos = ncoNumDigitos;
    }

    

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (ncoCodigo != null ? ncoCodigo.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof NumeraContratos)) {
            return false;
        }
        NumeraContratos other = (NumeraContratos) object;
        if ((this.ncoCodigo == null && other.ncoCodigo != null) || (this.ncoCodigo != null && !this.ncoCodigo.equals(other.ncoCodigo))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "org.cip.esymons.eventos.be.NumeraContratos[ncoCodigo=" + ncoCodigo + "]";
    }

}
